﻿using QLInternet.Components;
using QLInternet.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace QLInternet.ViewModel
{
    class PhuongThucViewModel: ObservableObject
    {
        private PhuongThuc pT = new PhuongThuc();
        private ObservableCollection<PhuongThuc> listPt;

        public PhuongThuc PT
        {
            get { return pT; }
            set
            {
                
                    pT = value;
                    NotifyPropertyChanged("PT");
                
            }
        }

        public int MaPT
        {
            get { return pT.MaPT; }
            set
            {
                if (pT.MaPT != value)
                {
                    pT.MaPT = value;
                    NotifyPropertyChanged("MaPT");
                }
            }

        }
        public int DenMB
        {
            get { return pT.DenMB; }
            set { pT.DenMB = value; }

        }
        public int DonGia
        {
            get { return pT.DonGia; }
            set { pT.DonGia = value; }

        }
        public int CuocToiDa
        {
            get { return pT.CuocToiDa; }
            set { pT.CuocToiDa = value; }

        }
        public int MoiMB
        {
            get { return pT.MoiMB; }
            set { pT.MoiMB = value; }

        }

        public ObservableCollection<PhuongThuc> ListPhuongThuc
        {
            get { return listPt; }
        }
        public void AddPhuongThuc()
        {
            listPt = new PhuongThuc().getDSPhuongThuc();
        }
        public PhuongThucViewModel()
        {
            listPt = new ObservableCollection<PhuongThuc>();
            AddPhuongThuc();
        }
    }
}
